{layout name="../common/master"/}
<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/dataanalyse/analyse.css">
<script src="__PUBLIC__/home/js/datacolor.js"></script>

<form action="" method="get" role="form">
    <div class="form-group">
        <input type="text" style="width: 200px;float: left;margin-right: 20px" class="form-control" {if condition="isset($_GET['date'])"}value="{$_GET['date']}"{/if} name="date" onclick="WdatePicker({startDate:'%y-%M-01',dateFmt:'yyyy-MM',alwaysUseStartDate:true})" placeholder="请输入统计日期">
    </div>
    <button type="submit" class="btn btn-primary">查询</button>
</form>
<div id="right" style="min-height: 850px;">
    <div id="main" style="width: 1080px;height:300px;"></div>
    <div id="main2" style="width: 1080px;height:300px;"></div>
    <div id="main3" style="width: 1080px;height:300px;"></div>
</div>
<script type="text/javascript" src="__PUBLIC__/home/dataanalyse/analyse.js"></script>
<script>
    var myChart = echarts.init(document.getElementById('main'));
    var myChart2 = echarts.init(document.getElementById('main2'));
    var myChart3 = echarts.init(document.getElementById('main3'));
    option = {
        title: {
            text: '用户日增长量统计'
        },
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'cross',
                crossStyle: {
                    color: '#999'
                }
            }
        },
        toolbox: {
            feature: {
                dataView: {show: true, readOnly: false},
                magicType: {show: true, type: ['line', 'bar']},
                restore: {show: true},
                saveAsImage: {show: true}
            }
        },
        legend: {
            data:['日注册量','日注册量']
        },
        xAxis: [
            {
                type: 'category',
                data: {$data['data']},
                axisPointer: {
                    type: 'shadow'
                }
            }
        ],
        yAxis: [
            {
                type: 'value',
                name: '日注册量',
                interval: 200,
                axisLabel: {
                    formatter: '{value} 人'
                }
            }
        ],
        series: [
            {
                name:'日注册量',
                type:'bar',
                data:{$data['date']}
            },
            {
                name:'日注册量',
                type:'line',
                zlevel:2,
                lineStyle:{
                    normal:{
                        color: {
                            type: 'linear'
                        }
                    }
                },
                data:{$data['date']}
            }
        ]
    };

    option2 = {
        title: {
            text: '借还款金额统计'
        },
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'cross',
                crossStyle: {
                    color: '#999'
                }
            }
        },
        toolbox: {
            feature: {
                dataView: {show: true, readOnly: false},
                magicType: {show: true, type: ['line', 'bar']},
                restore: {show: true},
                saveAsImage: {show: true}
            }
        },
        legend: {
            data:['借款总金额','还款总金额']
        },
        xAxis: {
            type: 'category',
            boundaryGap: false,
            data: {$data['data']}
        },
        yAxis: {
            type: 'value'
        },
        series: [
            {
                name:'借款总金额',
                type:'line',
                stack: '总量',
                data:{$data['countLoanMoney']}
            },
            {
                name:'还款总金额',
                type:'line',
                stack: '总量',
                data:{$data['countRepayMoney']}
            }
        ]
    };
    option3 = {
        title: {
            text: '借款笔数统计'
        },
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'cross',
                crossStyle: {
                    color: '#999'
                }
            }
        },
        toolbox: {
            feature: {
                dataView: {show: true, readOnly: false},
                magicType: {show: true, type: ['line', 'bar']},
                restore: {show: true},
                saveAsImage: {show: true}
            }
        },
        legend: {
            data:['借款笔数']
        },
        xAxis: [
            {
                type: 'category',
                data: {$data['data']},
                axisPointer: {
                    type: 'shadow'
                }
            }
        ],
        yAxis: [
            {
                type: 'value',
                name: '借款笔数',
                interval: 50,
                axisLabel: {
                    formatter: '{value} 笔'
                }
            }
        ],
        series: [
            {
                name:'借款笔数',
                type:'line',
                data:{$data['countLoan']}
            }
        ]
    };

    myChart.setOption(option);
    myChart2.setOption(option2);
    myChart3.setOption(option3);
</script>
<script type="text/javascript" src="__PUBLIC__/home/tuo/DatePicker/WdatePicker.js"></script>
<script src="http://echarts.baidu.com/build/dist/echarts-all.js"></script>